<?php
$root = realpath($_SERVER["DOCUMENT_ROOT"]) . "/SmartTuition";
// includes
require_once("$root/SmartTuition.Server/Abstraction/IController.php");
require_once("$root/SmartTuition.Server/Abstraction/Controller.php");

class StudentController extends Controller implements IController
{
	function __construct($unitOfWork){
		$this->unitOfWork = $unitOfWork;
	}

	function Index(){
		echo $this->unitOfWork->StudentRepository()->GetAll();
	}
	
	function Details(){
		$id = $_REQUEST["id"];
		echo $this->unitOfWork->StudentRepository()->GetById($id);
	}
	
	function Delete(){
		$id = $_REQUEST["id"];
		$this->unitOfWork->StudentRepository()->Delete($id);
	}
	
	function Edit(){
	}
	
	function Add(){
	}
}